<template>
  <div class="app-box">
    <h1>根组件</h1>
    <!-- 路由链接 -->
         <router-link to="/home" @click="show = !show">首页</router-link>
    <router-link to="/about">关于</router-link>
    <router-link to="/my">我的</router-link>
    <hr>
    <!-- 路由视图 -->
       <Transition name="fade" class="dv">
       <router-view></router-view>
    </Transition>
    
  </div>
</template>
<script setup>

</script>
<style scoped>
.app-box {
  text-align: center;
  font-size: 20px;
}
.app-box a{
  padding: 20px;
  color: #d876769a;
  text-decoration: none;
  font-weight: bold;
}
.app-box a.router-link-active{
  color: rgba(214, 41, 22, 0.884);
}
.fade-enter-active,
.fade-leave-active {
    transition: opacity 5s ease;
}

.fade-enter-from,
.fade-leave-to {
    opacity: 0;
}
</style>